package org.lds.ers.client.widgets;

import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.*;

public class MyDialog extends DialogBox implements ClickHandler {
	private final HTML html ;
	
	public MyDialog()
	{
		this.setText("對話方塊！");
		final VerticalPanel vp = new VerticalPanel();
		html = new HTML();
		html.setWidth("100%);");
		vp.add(html);
		final Button btnOk = new Button("OK");
		btnOk.addClickHandler(this);
		vp.add(btnOk);
		this.add(vp);
	}
	
	public void setContent(String htmlContent)
	{
		html.setHTML(htmlContent);
	}
	
	
	public void onClick(ClickEvent event) {
		this.hide();
	}

}
